From bd64f78cf111d4ed2d50b3379b15236fba4f9161 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Fri, 13 May 2005 11:57:31 +0000 Subject: [PATCH] * Special Page redirection now includes paramaters, e.g. Special:Orig/Par => Special:New/Par (it would previously have been truncated to Special:New) * Renamed Special:Randompage to Special:Random since it can get more than just random pages now. --- includes/SpecialPage.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 45020a8c85..bdc1d92cec 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -40,7 +40,7 @@ $wgSpecialPages = array( 'Newimages' => new SpecialPage( 'Newimages' ), 'Listusers' => new SpecialPage( 'Listusers' ), 'Statistics' => new SpecialPage( 'Statistics' ), - 'Randompage' => new SpecialPage( 'Randompage' ), + 'Random' => new SpecialPage( 'Randompage' ), 'Lonelypages' => new SpecialPage( 'Lonelypages' ), 'Uncategorizedpages'=> new SpecialPage( 'Uncategorizedpages' ), 'Uncategorizedcategories'=> new SpecialPage( 'Uncategorizedcategories' ), @@ -88,6 +88,9 @@ $wgSpecialPageRedirects = array( # Deprecated specialpages 'Listadmins' => Title::makeTitle( NS_SPECIAL, 'Listusers' ), + + # Redirects + 'Randompage' => Title::makeTitle( NS_SPECIAL, 'Random' ), ); global $wgUseValidation ; @@ -235,7 +238,10 @@ class SpecialPage if ( is_null( $page ) ) { $redir =& SpecialPage::getRedirect( $name ); if ( isset( $redir ) ) { - $wgOut->redirect ($redir->getFullURL()); + if ( isset( $par ) ) + $wgOut->redirect( $redir->getFullURL() . '/' . $par ); + else + $wgOut->redirect( $redir->getFullURL() ); } else { $wgOut->setArticleRelated( false ); $wgOut->setRobotpolicy( "noindex,follow" ); -- 2.20.1